package com.riwon.im.common.bean;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author wpy
 * @date 2018/5/10 16:12
 */
public class MsgCondition {
    @NotNull(message = "userId 不能为空")
    private Integer userId;
    /**
     * 接收者的用户id
     */
    private Integer toId;
    private Date startOn;
    private Date endOn;
    private int pageSize;
    private int pageNum;
    private boolean isNotRead;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Date getStartOn() {
        return startOn;
    }

    public void setStartOn(Date startOn) {
        this.startOn = startOn;
    }

    public Date getEndOn() {
        return endOn;
    }

    public void setEndOn(Date endOn) {
        this.endOn = endOn;
    }

    public int getPageSize() {
        return pageNum == 0?20:this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageNum == 0?1:this.pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public boolean isNotRead() {
        return isNotRead;
    }

    public void setNotRead(boolean notRead) {
        isNotRead = notRead;
    }

    public Integer getToId() {
        return toId;
    }

    public void setToId(Integer toId) {
        this.toId = toId;
    }
}
